/*
 * @LastEditors: zhouyaxue
 * @Date: 2022-09-05 09:58:13
 * @LastEditTime: 2023-01-07 09:20:05
 */
import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store/index';
import Element from 'element-plus';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import 'swiper/css/autoplay';

import "animate.css";
import 'animate.css/animate.compat.css';


import * as ElementPlusIconsVue from '@element-plus/icons-vue';
// import locale from './assets/locale/cn';
// import {debounce} from '@/public/utils';

import preventReClick from '@/public/preventReClick';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import * as echarts from 'echarts';
import 'echarts-liquidfill';
import Components from '@/components/components';
import 'element-plus/dist/index.css';
import '@/assets/style/common.scss';
import '@/assets/style/element.scss';
// 思源黑体字体
import '@/assets/font/font.css';
// 引入iconFont图标库
import '@/assets/iconfont/iconfont.css';
// import '@/assets/style/variable.scss'
// import '@/libs/flexible';


import VueVideoPlayer from '@videojs-player/vue'
import 'video.js/dist/video-js.css'


// import vueSeamlessScroll from 'vue-seamless-scroll'
import vue3SeamlessScroll from "vue3-seamless-scroll";

const Vue = createApp(App);
Vue.use(VueVideoPlayer)
Vue.use(vue3SeamlessScroll)



Vue.config.globalProperties.$echarts = echarts;

/**
 * 获取完整文件地址
 * @param fileName 文件路径
 */
const getFullPath = (fileName: string) => {
  if (!fileName) {
    return '';
  }
  return import.meta.env.VITE_APP_BASE_API + '/common/minio/downloadFile?fileName=' + fileName;
};
Vue.config.globalProperties.$getFullPath = getFullPath;

Vue.use(store);
Vue.use(router);
Vue.mount('#app');
Vue.use(Components);
Vue.use(preventReClick);
// Vue.use(vue3videoPlay);
Vue.use(Element, {
  locale: { ...zhCn },
});
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  Vue.component(key, component);
}
